package com.ruoyi.web.pojo.request.incomeexpense;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.web.domain.incomeexpense.ZQEmail;
import lombok.Data;

/**
 * 邮箱发送记录对象 tt_email
 * 
 * @author zq
 * @date 2024-01-13
 */
@Data
public class EmailUpDateReq extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    private Long userId;


    private String email;

    private String substance;


    public static ZQEmail toEmail(EmailUpDateReq req) {
        if (req == null) {
            return null;
        }
        ZQEmail zQEmail = new ZQEmail();
        zQEmail.setUserId(SecurityUtils.getUserId());
        zQEmail.setEmail(req.getEmail());
        zQEmail.setSubstance(req.getSubstance());

        return zQEmail;
    }
}
